<?php namespace App\Client\Feedback\Listeners;

use Auth;
use App\Core\Exceptions\InputError;
use App\Core\Service\Listeners\CreateListener as Base;

class CreateListener extends Base {
    
    public function onCreateGeneratedData(){
        $user = Auth::user();
        $client = $user->client;
        if(!$client){
            throw new InputError('非法操作');
        }
        $this->service->createData['client_id'] = $client->id;
    }
}